<template>
  <div>
    <el-card>
      <el-row :gutter="20">
        <el-col :span="6">
          所属类型:
          <el-select v-model="queryInfo.type" placeholder="请选择" style="width: 73%" size="mini" @change="loadData()">
            <el-option v-for="item in menulist" :key="item.id" :label="item.authName" :value="item.id"> </el-option>
          </el-select>
        </el-col>
        <el-col :span="4">
          样本编号:
          <el-input style="width: 100px" size="mini" v-model="queryInfo.number"></el-input>
        </el-col>
        <el-col :span="4">
          样本牌号:
          <el-input style="width: 100px" size="mini" v-model="queryInfo.mark"></el-input>
        </el-col>
        <el-col :span="4">
          <el-button type="primary" size="mini" @click="queryData">查询</el-button>
        </el-col>
      </el-row>
      <el-row style="margin: 10px 0 10px">
        <el-col :span="2">
          <el-button type="primary" size="mini" @click="showAdd"><i class="el-icon-plus"></i>添加</el-button>
        </el-col>
        <el-col :span="2" style="margin-left: 10px">
          <el-button type="primary" size="mini" @click="showImport"><i class="el-icon-arrow-right"></i>导入</el-button>
        </el-col>
      </el-row>
      <el-table :data="parameterList" border height="500px" style="margin: 10px 0 10px">
        <el-table-column align="center" type="index" width="100px"></el-table-column>
        <el-table-column align="center" label="牌号" prop="mark"></el-table-column>
        <el-table-column align="center" label="样品规格" prop="specification"></el-table-column>
        <el-table-column align="center" label="文件名" prop="fileName"></el-table-column>
        <el-table-column align="center" label="频率/Hz" prop="frequency"></el-table-column>
        <el-table-column align="center" label="测量日期	" prop="testDate"></el-table-column>
        <el-table-column align="center" label="测量数据">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-s-tools" @click="showMdataDialog(scope.row.id)"> </el-button>
          </template>
        </el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="editParameter(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 1)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页区 -->
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
    </el-card>

    <!-- 添加测量条件信息 -->
    <!-- 软磁静态原始波形 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible1" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter1.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter1.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter1.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter1.temperature"></el-input>
        </el-form-item>
        <el-form-item label="直流磁密/T:" label-width="170px">
          <el-input v-model="parameter1.dcMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="交流磁密/T:" label-width="170px">
          <el-input v-model="parameter1.acMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="直流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter1.dcMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="交流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter1.acMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter1.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter1.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter1.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="损耗/(J/kg):" label-width="170px">
          <el-input v-model="parameter1.wastage"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter1.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter1.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter1.maximumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="最小磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter1.minimumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter1.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter1.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter1.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter1.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter1.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter1.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible1 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter1">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁静态磁化曲线 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible2" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter2.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter2.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter2.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter2.temperature"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter2.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter2.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter2.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter2.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter2.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter2.maximumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="最小磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter2.minimumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter2.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter2.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter2.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter2.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter2.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter2.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible2 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter2">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁静态磁滞回线 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible3" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter3.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter3.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter3.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter3.temperature"></el-input>
        </el-form-item>
        <el-form-item label="直流磁密/T:" label-width="170px">
          <el-input v-model="parameter3.dcMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="交流磁密/T:" label-width="170px">
          <el-input v-model="parameter3.acMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="直流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter3.dcMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="交流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter3.acMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter3.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter3.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter3.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="损耗/(J/kg):" label-width="170px">
          <el-input v-model="parameter3.wastage"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter3.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter3.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter3.maximumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="最小磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter3.minimumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter3.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter3.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter3.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter3.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter3.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter3.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible3 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter3">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁静态铁损曲线 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible4" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter4.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter4.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter4.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter4.temperature"></el-input>
        </el-form-item>
        <el-form-item label="最大铁损/(W/kg):" label-width="170px">
          <el-input v-model="parameter5.maximumIronLoss"></el-input>
        </el-form-item>
        <el-form-item label="最小铁损/(W/kg):" label-width="170px">
          <el-input v-model="parameter5.minimumIronLoss"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter5.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter5.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter5.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter5.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter5.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter5.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter5.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter5.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter5.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter5.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter5.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible4 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter4">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态原始波形 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible5" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter5.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter5.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter5.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter5.temperature"></el-input>
        </el-form-item>
        <el-form-item label="直流磁密/T:" label-width="170px">
          <el-input v-model="parameter5.dcMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="交流磁密/T:" label-width="170px">
          <el-input v-model="parameter5.acMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="直流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter5.dcMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="交流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter5.acMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter5.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter5.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter5.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="损耗/(J/kg):" label-width="170px">
          <el-input v-model="parameter5.wastage"></el-input>
        </el-form-item>
        <el-form-item label="视在功率(VA/kg):" label-width="170px">
          <el-input v-model="parameter5.apparentPower"></el-input>
        </el-form-item>
        <el-form-item label="电势波形因子:" label-width="170px">
          <el-input v-model="parameter5.potentialFactor"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter5.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter5.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter5.maximumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="最小磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter5.minimumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter5.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter5.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter5.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter5.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter5.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter5.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible5 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter5">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态磁化曲线 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible6" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter6.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter6.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter6.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter6.temperature"></el-input>
        </el-form-item>
        <el-form-item label="直流磁密/T:" label-width="170px">
          <el-input v-model="parameter6.dcMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter6.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter6.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter6.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter6.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter6.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter6.maximumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="最小磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter6.minimumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter6.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter6.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter6.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter6.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter6.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter6.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible6 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter6">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态磁滞回线 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible7" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter7.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter7.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter7.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter7.temperature"></el-input>
        </el-form-item>
        <el-form-item label="直流磁密/T:" label-width="170px">
          <el-input v-model="parameter7.dcMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="交流磁密/T:" label-width="170px">
          <el-input v-model="parameter7.acMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="直流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter7.dcMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="交流磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter7.acMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter7.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter7.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter7.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="损耗/(J/kg):" label-width="170px">
          <el-input v-model="parameter7.wastage"></el-input>
        </el-form-item>
        <el-form-item label="视在功率(VA/kg):" label-width="170px">
          <el-input v-model="parameter7.apparentPower"></el-input>
        </el-form-item>
        <el-form-item label="电势波形因子:" label-width="170px">
          <el-input v-model="parameter7.potentialFactor"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter7.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter7.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter7.maximumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="最小磁场/(A/m):" label-width="170px">
          <el-input v-model="parameter7.minimumMagneticField"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter7.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter7.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter7.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter7.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter7.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter7.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible7 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter7">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态铁损曲线 -->
    <el-dialog :title="`编辑/添加测量条件信息`" :visible.sync="addParameterVisible8" width="60%">
      <el-form :inline="true">
        <el-form-item label="所属类型:" label-width="170px">
          <el-input :disabled="true" v-model="queryInfo.type"></el-input>
        </el-form-item>
        <el-form-item label="样本编号:" label-width="170px">
          <el-input v-model="parameter8.productId"></el-input>
        </el-form-item>
        <el-form-item label="裁剪角度/Deg:" label-width="170px">
          <el-input v-model="parameter8.cuttingAngle"></el-input>
        </el-form-item>
        <el-form-item label="频率/Hz:" label-width="170px">
          <el-input v-model="parameter8.frequency"></el-input>
        </el-form-item>
        <el-form-item label="温度/Cel.Deg:" label-width="170px">
          <el-input v-model="parameter8.temperature"></el-input>
        </el-form-item>
        <el-form-item label="直流磁密/T:" label-width="170px">
          <el-input v-model="parameter8.dcMagneticDensity"></el-input>
        </el-form-item>
        <el-form-item label="最大铁损/(W/kg):" label-width="170px">
          <el-input v-model="parameter8.maximumIronLoss"></el-input>
        </el-form-item>
        <el-form-item label="最小铁损/(W/kg):" label-width="170px">
          <el-input v-model="parameter8.minimumIronLoss"></el-input>
        </el-form-item>
        <el-form-item label="最大磁密/T:" label-width="170px">
          <el-input v-model="parameter8.maximumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="最小磁密/T:" label-width="170px">
          <el-input v-model="parameter8.minimumFluxDensity"></el-input>
        </el-form-item>
        <el-form-item label="叠压方向应力/MPa:" label-width="170px">
          <el-input v-model="parameter8.overlyingStress"></el-input>
        </el-form-item>
        <el-form-item label="平行应力/MPa:" label-width="170px">
          <el-input v-model="parameter8.parallelStress"></el-input>
        </el-form-item>
        <el-form-item label="消除应力退火:" label-width="170px">
          <el-input v-model="parameter8.stressReliefAnnealing"></el-input>
        </el-form-item>
        <el-form-item label="有无护套:" label-width="170px">
          <el-input v-model="parameter8.sheath"></el-input>
        </el-form-item>
        <el-form-item label="测量标准:" label-width="170px">
          <el-input v-model="parameter8.standard"></el-input>
        </el-form-item>
        <el-form-item label="测试员:" label-width="170px">
          <el-input v-model="parameter8.testControler"></el-input>
        </el-form-item>
        <el-form-item label="测量日期:" label-width="170px">
          <el-input v-model="parameter8.testDate"></el-input>
        </el-form-item>
        <el-form-item label="备注:" label-width="170px">
          <el-input v-model="parameter8.remarks"></el-input>
        </el-form-item>
        <el-form-item label="文件名:" label-width="170px">
          <el-input v-model="parameter8.fileName"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addParameterVisible8 = false">取 消</el-button>
        <el-button type="primary" @click="addParameter8">确 定</el-button>
      </span>
    </el-dialog>

    <!-- 测量数据信息对话框 -->
    <!-- 软磁静态原始波形 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible1" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Ival/A" prop="lvalA"></el-table-column>
        <el-table-column align="center" label="Fval/V:" prop="fvalV"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible1" width="50%">
      <el-form>
        <el-form-item label="Ival/A:" label-width="170px">
          <el-input v-model="editmdataList1.lvalA" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Fval/V:" label-width="170px">
          <el-input v-model="editmdataList1.fvalV" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible1 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁静态磁化曲线 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible2" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Hdc/(A/m)" prop="hdcAm"></el-table-column>
        <el-table-column align="center" label="Bdc/(T):" prop="bdcT"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible2" width="50%">
      <el-form>
        <el-form-item label="Hdc/(A/m):" label-width="170px">
          <el-input v-model="editmdataList2.hdcAm" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Bdc/(T):" label-width="170px">
          <el-input v-model="editmdataList2.bdcT" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible2 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁静态磁滞回线 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible3" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Ht/(A/m)" prop="htAm"></el-table-column>
        <el-table-column align="center" label="Bt/(T):" prop="btT"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible3" width="50%">
      <el-form>
        <el-form-item label="Ht/(A/m):" label-width="170px">
          <el-input v-model="editmdataList3.htAm" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Bt/(T):" label-width="170px">
          <el-input v-model="editmdataList3.btT" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible3 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁静态铁损曲线 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible4" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Bm/T" prop="bmT"></el-table-column>
        <el-table-column align="center" label="Eh/(J/kg):" prop="enJkg"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible4" width="50%">
      <el-form>
        <el-form-item label="Bm/T:" label-width="170px">
          <el-input v-model="editmdataList4.bmT" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Eh/(J/kg):" label-width="170px">
          <el-input v-model="editmdataList4.enJkg" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible4 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态原始波形 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible5" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="it/A" prop="itA"></el-table-column>
        <el-table-column align="center" label="et/V:" prop="etV"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible5" width="50%">
      <el-form>
        <el-form-item label="it/A:" label-width="170px">
          <el-input v-model="editmdataList5.itA" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="et/V:" label-width="170px">
          <el-input v-model="editmdataList5.etV" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible5 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态磁化曲线 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible6" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Hm/(A/m)" prop="unitHm"></el-table-column>
        <el-table-column align="center" label="Bm/(T):" prop="unitBm"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible6" width="50%">
      <el-form>
        <el-form-item label="Hm/(A/m):" label-width="170px">
          <el-input v-model="editmdataList6.unitHm" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Bm/(T):" label-width="170px">
          <el-input v-model="editmdataList6.unitBm" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible6 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态磁滞回线 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible7" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Ht/(A/m)" prop="htAm"></el-table-column>
        <el-table-column align="center" label="Bt/(T):" prop="btT"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible7" width="50%">
      <el-form>
        <el-form-item label="Ht/(A/m):" label-width="170px">
          <el-input v-model="editmdataList7.htAm" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Bt/(T):" label-width="170px">
          <el-input v-model="editmdataList7.btT" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible7 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 软磁动态铁损曲线 -->
    <el-dialog title="测量数据信息" :visible.sync="mdataDiaVisible8" width="50%">
      <el-button type="primary" @click="addMData">新增</el-button>
      <el-table :data="mdataList">
        <el-table-column type="index"></el-table-column>
        <el-table-column align="center" label="Bm/T" prop="bmT"></el-table-column>
        <el-table-column align="center" label="Ps/(W/kg):" prop="psWkg"></el-table-column>
        <el-table-column align="center" label="操作">
          <template slot-scope="scope">
            <el-button type="text" icon="el-icon-edit" @click="showedit(scope.row)"> </el-button>
            <el-button type="text" icon="el-icon-delete" @click="showDel(scope.row.id, 2)"> </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog title="编辑/新增测量数据信息" :visible.sync="editMDateDiaVisible8" width="50%">
      <el-form>
        <el-form-item label="Bm/T:" label-width="170px">
          <el-input v-model="editmdataList8.bmT" style="width: 300px"></el-input>
        </el-form-item>
        <el-form-item label="Ps/(W/kg):" label-width="170px">
          <el-input v-model="editmdataList8.psWkg" style="width: 300px"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editMDateDiaVisible8 = false">取 消</el-button>
        <el-button type="primary" @click="subEditData()">确 定</el-button>
      </span>
    </el-dialog>

    <!-- 删除提示对话框 -->
    <el-dialog title="提示" :visible.sync="delDiaVisible" width="50%">
      <span style="font-size: 20px; display: inline-block; align: center">确定删除此数据吗？</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="delDiaVisible = false">取 消</el-button>
        <el-button type="primary" @click="del()">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 导入按钮 -->
    <el-dialog title="提示" :visible.sync="importTag" width="60%">
      <div style="font-size: 20px; margin-left: 40px">请下载导入模板进行导入</div>
      <span slot="footer" class="dialog-footer">
        <el-select v-model="selectedproductId" placeholder="请选择" style="width: 194px">
          <el-option v-for="item in productIdList" :key="item.id" :label="item.id" :value="item.id"> </el-option>
        </el-select>
        <el-button type="primary" style="margin-right: 20px" @click="exportData">下载模板</el-button>
        <a-upload name="file" :action="uploadUrl" accept=".xls,.xlsx" :data="paramData" :multiple="true" @change="handleChange" :showUploadList="false">
          <el-button type="primary">已有模板，立即导入</el-button>
        </a-upload>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      productIdList: [],
      selectedproductId: '',
      paramData: {
        name: '2'
      },
      uploadUrl: 'http://59.172.104.174:30669/admin/uploadLessonFile',
      rowId: '',
      editMDateDiaVisible: false,
      activeNum: '1',
      defaultActive: '1',
      isCollapse: false,
      //目录导航列表
      menulist: [
        {
          id: '软磁静态原始波形',
          authName: '软磁+静态+原始波形'
        },
        {
          id: '软磁静态磁化曲线',
          authName: '软磁+静态+磁化曲线'
        },
        {
          id: '软磁静态磁滞回线',
          authName: '软磁+静态+磁滞回线'
        },
        {
          id: '软磁静态铁损曲线',
          authName: '软磁+静态+铁损曲线'
        },
        {
          id: '软磁动态原始波形',
          authName: '软磁+动态+原始波形'
        },
        {
          id: '软磁动态磁化曲线',
          authName: '软磁+动态+磁化曲线'
        },
        {
          id: '软磁动态磁滞回线',
          authName: '软磁+动态+磁滞回线'
        },
        {
          id: '软磁动态铁损曲线',
          authName: '软磁+动态+铁损曲线'
        }
      ],
      total: 0,
      delItemId: '',
      delDiaVisible: false,
      parameter: {},
      //软磁静态原始波形
      parameter1: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        dcMagneticDensity: '', //直流磁密/T
        acMagneticDensity: '', //交流磁密/T
        dcMagneticField: '', //直流磁场/(A/m)
        acMagneticField: '', //交流磁场/(A/m)
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        wastage: '', //损耗/(J/kg)
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        maximumMagneticField: '', //最大磁场/(A/m)
        minimumMagneticField: '', //最小磁场/(A/m)
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },
      mdataList: [],
      editmdataList1: {
        id: '',
        dataId: '',
        lvalA: '',
        fvalV: ''
      },
      //软磁静态磁化曲线
      parameter2: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        maximumMagneticField: '', //最大磁场/(A/m)
        minimumMagneticField: '', //最小磁场/(A/m)
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList2: {
        id: '',
        dataId: '',
        hdcAm: '',
        bdcT: ''
      },
      //软磁静态磁滞回线
      parameter3: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        dcMagneticDensity: '', //直流磁密/T
        acMagneticDensity: '', //交流磁密/T
        dcMagneticField: '', //直流磁场/(A/m)
        acMagneticField: '', //交流磁场/(A/m)
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        wastage: '', //损耗/(J/kg)
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        maximumMagneticField: '', //最大磁场/(A/m)
        minimumMagneticField: '', //最小磁场/(A/m)
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList3: {
        id: '',
        dataId: '',
        htAm: '',
        btT: ''
      },
      //软磁静态铁损曲线
      parameter4: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        maximumIronLoss: '', //最大铁损/(W/kg)
        minimumIronLoss: '', //最小铁损/(W/kg)
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList4: {
        id: '',
        dataId: '',
        bmT: '',
        enJkg: ''
      },
      //软磁动态原始波形
      parameter5: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        dcMagneticDensity: '', //直流磁密/T
        acMagneticDensity: '', //交流磁密/T
        dcMagneticField: '', //直流磁场/(A/m)
        acMagneticField: '', //交流磁场/(A/m)
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        wastage: '', //损耗/(J/kg)
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        maximumMagneticField: '', //最大磁场/(A/m)
        minimumMagneticField: '', //最小磁场/(A/m)
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList5: {
        id: '',
        dataId: '',
        itA: '',
        etV: ''
      },
      //软磁动态磁化曲线
      parameter6: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        dcMagneticDensity: '', //直流磁密/T
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        maximumMagneticField: '', //最大磁场/(A/m)
        minimumMagneticField: '', //最小磁场/(A/m)
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList6: {
        id: '',
        dataId: '',
        unitHm: '',
        unitBm: ''
      },
      //软磁动态磁滞回线
      parameter7: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        dcMagneticDensity: '', //直流磁密/T
        acMagneticDensity: '', //交流磁密/T
        dcMagneticField: '', //直流磁场/(A/m)
        acMagneticField: '', //交流磁场/(A/m)
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        wastage: '', //损耗/(J/kg)
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        maximumMagneticField: '', //最大磁场/(A/m)
        minimumMagneticField: '', //最小磁场/(A/m)
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList7: {
        id: '',
        dataId: '',
        htAm: '',
        btT: ''
      },
      //软磁动态铁损曲线
      parameter8: {
        id: '', //主键
        productId: '', //样品id
        cuttingAngle: '', //裁剪角度/Deg
        frequency: '', //频率/Hz
        temperature: '', //温度/Cel.Deg
        dcMagneticDensity: '', //直流磁密/T
        maximumIronLoss: '', //最大铁损/(W/kg)
        minimumIronLoss: '', //最小铁损/(W/kg)
        maximumFluxDensity: '', //最大磁密/T
        minimumFluxDensity: '', //最小磁密/T
        overlyingStress: '', //叠压方向应力/MPa
        parallelStress: '', //平行应力/MPa
        stressReliefAnnealing: '', //消除应力退火
        sheath: '', //有无护套
        standard: '', //测量标准
        testControler: '', //测试员
        testDate: '', //测量日期
        remarks: '', //备注
        fileName: '', //文件名
        state: '', //是否已经审核
        time: '' //上传时间
      },

      editmdataList8: {
        id: '',
        dataId: '',
        bmT: '',
        psWkg: ''
      },
      addParameterVisible1: false,
      addParameterVisible2: false,
      addParameterVisible3: false,
      addParameterVisible4: false,
      addParameterVisible5: false,
      addParameterVisible6: false,
      addParameterVisible7: false,
      addParameterVisible8: false,
      mdataDiaVisible1: false,
      mdataDiaVisible2: false,
      mdataDiaVisible3: false,
      mdataDiaVisible4: false,
      mdataDiaVisible5: false,
      mdataDiaVisible6: false,
      mdataDiaVisible7: false,
      mdataDiaVisible8: false,
      editMDateDiaVisible1: false,
      editMDateDiaVisible2: false,
      editMDateDiaVisible3: false,
      editMDateDiaVisible4: false,
      editMDateDiaVisible5: false,
      editMDateDiaVisible6: false,
      editMDateDiaVisible7: false,
      editMDateDiaVisible8: false,
      parameterList: [],
      queryInfo: {
        // number: '',
        // mark: '',
        // supplier: '',
        pageNum: 1,
        pageSize: 10,
        type: '软磁静态原始波形'
      },
      editId: '',
      importTag: false,
      markList: [],
      type: 0
    }
  },
  created() {
    this.loadData()
    this.getOriginMessage()
  },
  methods: {
    showAdd() {
      if (this.queryInfo.type == '软磁静态原始波形') {
        this.addParameterVisible1 = true
        this.parameter = this.parameter1
      } else if (this.queryInfo.type == '软磁静态磁化曲线') {
        this.addParameterVisible2 = true
        this.parameter = this.parameter2
      } else if (this.queryInfo.type == '软磁静态磁滞回线') {
        this.addParameterVisible3 = true
        this.parameter = this.parameter3
      } else if (this.queryInfo.type == '软磁静态铁损曲线') {
        this.addParameterVisible4 = true
        this.parameter = this.parameter4
      } else if (this.queryInfo.type == '软磁动态原始波形') {
        this.addParameterVisible5 = true
        this.parameter = this.parameter5
      } else if (this.queryInfo.type == '软磁动态磁化曲线') {
        this.addParameterVisible6 = true
        this.parameter = this.parameter6
      } else if (this.queryInfo.type == '软磁动态磁滞回线') {
        this.addParameterVisible7 = true
        this.parameter = this.parameter7
      } else if (this.queryInfo.type == '软磁动态铁损曲线') {
        this.addParameterVisible8 = true
        this.parameter = this.parameter8
      }
    },
    handleChange(info) {
      if (info.file.status === 'done') {
        if (info.file.response.code == '201') {
          this.$message.success('重新上传文件成功！')
        } else if (info.file.response.code == '200') {
          this.$message.success('上传文件成功！')
        }
      }
    },
    //模板导出按钮
    exportData() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: `/admin/downLoadLessonFile?name=牌号标签`,
        methods: 'GET',
        responseType: 'blob'
      }).then(res => {
        const blob = new Blob([res.data])
        const url = window.URL.createObjectURL(blob)
        const link = document.createElement('a')
        link.style.display = 'none'
        link.download = `牌号标签.xlsx`
        link.href = url
        link.click()
      })
    },
    //导入
    showImport() {
      this.importTag = true
    },
    addMData() {
      if (this.queryInfo.type == '软磁静态原始波形') {
        this.editMDateDiaVisible1 = true
        this.editmdataList1.Ival = ''
        this.editmdataList1.Fval = ''
      } else if (this.queryInfo.type == '软磁静态磁化曲线') {
        this.editMDateDiaVisible2 = true
        this.editmdataList2.Hdc = ''
        this.editmdataList2.Bdc = ''
      } else if (this.queryInfo.type == '软磁静态磁滞回线') {
        this.editMDateDiaVisible3 = true
        this.editmdataList3.Ht = ''
        this.editmdataList3.Bt = ''
      } else if (this.queryInfo.type == '软磁静态铁损曲线') {
        this.editMDateDiaVisible4 = true
        this.editmdataList4.Bm = ''
        this.editmdataList4.Eh = ''
      } else if (this.queryInfo.type == '软磁动态原始波形') {
        this.editMDateDiaVisible5 = true
        this.editmdataList5.it = ''
        this.editmdataList5.et = ''
      } else if (this.queryInfo.type == '软磁动态磁化曲线') {
        this.editMDateDiaVisible6 = true
        this.editmdataList6.Hm = ''
        this.editmdataList6.Bm = ''
      } else if (this.queryInfo.type == '软磁动态磁滞回线') {
        this.editMDateDiaVisible7 = true
        this.editmdataList7.Ht = ''
        this.editmdataList7.Bt = ''
      } else if (this.queryInfo.type == '软磁动态铁损曲线') {
        this.editMDateDiaVisible8 = true
        this.editmdataList8.Bm = ''
        this.editmdataList8.Ps = ''
      }
      this.editId = ''
    },
    showMdataDialog(id) {
      this.rowId = id
      if (this.queryInfo.type == '软磁静态原始波形') {
        this.mdataDiaVisible1 = true
      } else if (this.queryInfo.type == '软磁静态磁化曲线') {
        this.mdataDiaVisible2 = true
      } else if (this.queryInfo.type == '软磁静态磁滞回线') {
        this.mdataDiaVisible3 = true
      } else if (this.queryInfo.type == '软磁静态铁损曲线') {
        this.mdataDiaVisible4 = true
      } else if (this.queryInfo.type == '软磁动态原始波形') {
        this.mdataDiaVisible5 = true
      } else if (this.queryInfo.type == '软磁动态磁化曲线') {
        this.mdataDiaVisible6 = true
      } else if (this.queryInfo.type == '软磁动态磁滞回线') {
        this.mdataDiaVisible7 = true
      } else if (this.queryInfo.type == '软磁动态铁损曲线') {
        this.mdataDiaVisible8 = true
      }
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: `/productMetricalData/getMaterialDatas?id=${id}&type=${this.queryInfo.type}`,
        method: 'GET'
      }).then(res => {
        this.mdataList = res.data.result
      })
    },
    // 提交测量数据
    subEditData() {
      var url1 = '/productMetricalData/ProductStaticPrimitiveFirst/insertOrUpdateData'
      var url2 = '/productMetricalData/ProductStaticMagnetizingCurve/insertOrUpdateData'
      var url3 = '/productMetricalData/ProductStaticHysteresisLoop/insertOrUpdateData'
      var url4 = '/productMetricalData/ProductStaticIronLossCurve/insertOrUpdateData'
      var url5 = '/productMetricalData/ProductDynamicPrimitiveFirst/insertOrUpdateData'
      var url6 = '/productMetricalData/ProductDynamicMagnetizingCurve/insertOrUpdateData'
      var url7 = '/productMetricalData/ProductDynamicHysteresisLoop/insertOrUpdateData'
      var url8 = '/productMetricalData/ProductDynamicIronLossCurve/insertOrUpdateData'
      var url = ''
      var MetricalData = {}
      if (this.queryInfo.type == '软磁静态原始波形') {
        url = url1
        MetricalData = this.editmdataList1
      } else if (this.queryInfo.type == '软磁静态磁化曲线') {
        url = url2
        MetricalData = this.editmdataList2
      } else if (this.queryInfo.type == '软磁静态磁滞回线') {
        url = url3
        MetricalData = this.editmdataList3
      } else if (this.queryInfo.type == '软磁静态铁损曲线') {
        url = url4
        MetricalData = this.editmdataList4
      } else if (this.queryInfo.type == '软磁动态原始波形') {
        url = url5
        MetricalData = this.editmdataList5
      } else if (this.queryInfo.type == '软磁动态磁化曲线') {
        url = url6
        MetricalData = this.editmdataList6
      } else if (this.queryInfo.type == '软磁动态磁滞回线') {
        url = url7
        MetricalData = this.editmdataList7
      } else if (this.queryInfo.type == '软磁动态铁损曲线') {
        url = url8
        MetricalData = this.editmdataList8
      }
      MetricalData.dataId = this.rowId
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url,
        method: 'POST',
        data: MetricalData
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功')
          this.editMDateDiaVisible1 = false
          this.editMDateDiaVisible2 = false
          this.editMDateDiaVisible3 = false
          this.editMDateDiaVisible4 = false
          this.editMDateDiaVisible5 = false
          this.editMDateDiaVisible6 = false
          this.editMDateDiaVisible7 = false
          this.editMDateDiaVisible8 = false
          this.showMdataDialog(this.rowId)
        }
      })
    },
    queryData() {},
    showedit(row) {
      if (this.queryInfo.type == '软磁静态原始波形') {
        this.editMDateDiaVisible1 = true
        this.editmdataList1 = row
      } else if (this.queryInfo.type == '软磁静态磁化曲线') {
        this.editMDateDiaVisible2 = true
        this.editmdataList2 = row
      } else if (this.queryInfo.type == '软磁静态磁滞回线') {
        this.editMDateDiaVisible3 = true
        this.editmdataList3 = row
      } else if (this.queryInfo.type == '软磁静态铁损曲线') {
        this.editMDateDiaVisible4 = true
        this.editmdataList4 = row
      } else if (this.queryInfo.type == '软磁动态原始波形') {
        this.editMDateDiaVisible5 = true
        this.editmdataList5 = row
      } else if (this.queryInfo.type == '软磁动态磁化曲线') {
        this.editMDateDiaVisible6 = true
        this.editmdataList6 = row
      } else if (this.queryInfo.type == '软磁动态磁滞回线') {
        this.editMDateDiaVisible7 = true
        this.editmdataList7 = row
      } else if (this.queryInfo.type == '软磁动态铁损曲线') {
        this.editMDateDiaVisible8 = true
        this.editmdataList8 = row
      }
    },
    //编辑测量条件
    editData() {},
    getTypeList() {},
    selectParameter() {
      this.addParamseterVisible = true
    },
    //新增或修改软磁静态原始波形测量条件
    addParameter1() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductStaticPrimitiveFirst/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible1 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁静态磁化曲线测量条件
    addParameter2() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductStaticMagnetizingCurve/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible2 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁静态磁滞曲线测量条件
    addParameter3() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductStaticHysteresisLoop/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible3 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁静态铁损曲线测量条件
    addParameter4() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductStaticIronLossCurve/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible4 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁动态原始波形测量条件
    addParameter5() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductDynamicPrimitiveFirst/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible5 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁动态磁化曲线测量条件
    addParameter6() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductDynamicMagnetizingCurve/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible6 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁动态磁滞回线测量条件
    addParameter7() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductDynamicHysteresisLoop/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible7 = false
          this.loadData()
        }
      })
    },
    //新增或修改软磁动态铁损曲线测量条件
    addParameter8() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/productMeasurement/ProductDynamicIronLossCurve/insertOrUpdateMeasurement',
        method: 'POST',
        data: this.parameter
      }).then(res => {
        if (res.data.code === 200) {
          this.$message.success('操作成功！！！')
          this.addParameterVisible8 = false
          this.loadData()
        }
      })
    },
    editParameter(row) {
      if (this.queryInfo.type == '软磁静态原始波形') {
        this.addParameterVisible1 = true
        this.parameter1 = row
      } else if (this.queryInfo.type == '软磁静态磁化曲线') {
        this.addParameterVisible2 = true
        this.parameter2 = row
      } else if (this.queryInfo.type == '软磁静态磁滞回线') {
        this.addParameterVisible3 = true
        this.parameter3 = row
      } else if (this.queryInfo.type == '软磁静态铁损曲线') {
        this.addParameterVisible4 = true
        this.parameter4 = row
      } else if (this.queryInfo.type == '软磁动态原始波形') {
        this.addParameterVisible5 = true
        this.parameter5 = row
      } else if (this.queryInfo.type == '软磁动态磁化曲线') {
        this.addParameterVisible6 = true
        this.parameter6 = row
      } else if (this.queryInfo.type == '软磁动态磁滞回线') {
        this.addParameterVisible7 = true
        this.parameter7 = row
      } else if (this.queryInfo.type == '软磁动态铁损曲线') {
        this.addParameterVisible8 = true
        this.parameter8 = row
      }
    },
    //控制删除对话框
    showDel(id, type) {
      this.type = type
      this.delItemId = id
      this.delDiaVisible = true
    },
    //发起真正的删除操作
    del() {
      if (this.type === 1) {
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: `/productMeasurement/deleteMeasurement?id=${this.delItemId}&num=${this.queryInfo.type}`,
          methods: 'GET'
        }).then(res => {
          if (res.data.code == 200) {
            this.delDiaVisible = false
            this.loadData()
          }
        })
      } else if (this.type === 2) {
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: `/productMetricalData/deleteMeasurement?id=${this.delItemId}&type=${this.queryInfo.type}`,
          methods: 'GET'
        }).then(res => {
          if (res.data.code == 200) {
            this.delDiaVisible = false
            this.showMdataDialog(this.rowId)
          }
        })
      }
    },
    //分页控制
    handleSizeChange(newSize) {
      this.queryInfo.pageSize = newSize
    },
    handleCurrentChange(newPage) {
      this.queryInfo.pageNum = newPage
    },
    loadData() {
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: `/productMeasurement/selectMeasurement`,
        method: 'POST',
        data: this.queryInfo
      }).then(res => {
        this.parameterList = res.data.result.records
        this.total = res.data.result.total
      })
    },
    //获取常用信息
    getOriginMessage() {
      this.getStandard()
      this.getTypeList()
      this.getAllMark()
    },
    //获取所有牌号
    getAllMark() {
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/basicsMarks/getAllMarks',
        method: 'GET'
      }).then(res => {
        this.markList = res.data.result.mark
      })
    },
    //获取所有的执行标准
    getStandard() {
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/basicsExecutionStandard/selectExecution',
        method: 'POST'
      }).then(res => {
        this.standardList = res.data.result
      })
    }
  }
}
</script>

<style scoped></style>
